package com.qnzw.zjmy.home.fragment;

import android.annotation.SuppressLint;
import android.app.AlertDialog;
import android.content.Intent;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.android.volley.Request;
import com.android.volley.VolleyError;
import com.anythink.nativead.api.ATNativeAdView;
import com.qnzw.zjmy.wxapi.WXEntryActivity;
import com.ruffian.library.widget.RTextView;
import com.qnzw.zjmy.BuildConfig;
import com.qnzw.zjmy.R;
import com.qnzw.zjmy.ad.MediationTablePlaqueAd;
import com.qnzw.zjmy.ad.inter.RewardAdCallbackInter;
import com.qnzw.zjmy.ad.inter.RewardAdFullAdInter;
import com.qnzw.zjmy.ad.inter.RewardAdInter;
import com.qnzw.zjmy.ad.kaku.TaKuInterstitialFullAd;
import com.qnzw.zjmy.ad.kaku.TaKuRewardAdCallback;
import com.qnzw.zjmy.ad.kaku.banner.TaKuBannerAdOne;
import com.qnzw.zjmy.ad.kaku.banner.TaKuBannerAdOneCW;
import com.qnzw.zjmy.ad.kaku.banner.TaKuBannerAdOneDT;
import com.qnzw.zjmy.ad.kaku.banner.TaKuBannerAdOneJL;
import com.qnzw.zjmy.ad.kaku.banner.TaKuBannerAdOneTop;
import com.qnzw.zjmy.ad.kaku.interstitia.TaKuInterstitialAdOne;
import com.qnzw.zjmy.ad.kaku.interstitia.TaKuInterstitialAdOneCW;
import com.qnzw.zjmy.ad.kaku.interstitia.TaKuInterstitialAdOneDT;
import com.qnzw.zjmy.ad.kaku.interstitia.TaKuInterstitialAdOneJL;
import com.qnzw.zjmy.ad.kaku.nativie.TaKuNativeAdOneCW;
import com.qnzw.zjmy.ad.kaku.nativie.TaKuNativeAdOneDT;
import com.qnzw.zjmy.ad.kaku.nativie.TaKuNativeAdOneJL;
import com.qnzw.zjmy.ad.kaku.reward.TaKuRewardAdOne;
import com.qnzw.zjmy.config.UrlAddressConfig;
import com.qnzw.zjmy.config.UrlConfig;
import com.qnzw.zjmy.home.ui.activity.WithdrawalActivity;
import com.qnzw.zjmy.home.ui.enums.AdStatusEnum;
import com.qnzw.zjmy.home.ui.enums.MoneyTypeEnum;
import com.qnzw.zjmy.home.ui.enums.RedisEnum;
import com.qnzw.zjmy.home.ui.enums.RiskEnum;
import com.qnzw.zjmy.home.ui.model.Answer;
import com.qnzw.zjmy.home.ui.model.ConfigInfo;
import com.qnzw.zjmy.home.ui.model.TrandsName;
import com.qnzw.zjmy.home.ui.model.statistics.DayAdReward;
import com.qnzw.zjmy.home.ui.model.vo.BaseVo;
import com.qnzw.zjmy.utils.risk.DeviceUtils;
import com.qnzw.zjmy.volley.BaseFragment;
import com.qnzw.zjmy.volley.httpUtil.interfase.HUCCallBackInterfase;
import com.qnzw.zjmy.volley.state.HUCState;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.Objects;

import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;

public class ContentFragment extends BaseFragment implements RewardAdInter, RewardAdCallbackInter, RewardAdFullAdInter {
    private View view;


    //加载
    private AlertDialog alertDialog;


    //答题卡
    private TextView tvLevel, tvValueAontent, tvValueA, tvValueB;
    List<TextView> textViewList;
    //答题 start

    //记录当前答题目数量
    private int indexTextViewList = 0;
    //记录答对题目数量
    private int answerCount = 0;
    private Answer answer;
    private List<Answer> answerList;
    private TextView tvMoneyRedPacket, tvMoneyGoldCoin, tvNickname, tvCode;
    //答题 send
    //获取用户激励视频广告
    private String orderId;
    private TextView channel_package;
    private TextView tv_parent_id;
    private TextView tv_time;

    private AlertDialog loadingDialogTransID;

    private TaKuRewardAdCallback taKuRewardAdCallback;
    private TaKuInterstitialFullAd taKuInterstitialFullAd;

    private TaKuBannerAdOneTop taKuBannerAdOneTop;
    private TaKuBannerAdOne taKuBannerAdOne;

    //初始化 插屏广告
    MediationTablePlaqueAd mediationTablePlaqueAd;

    //缓存用户奖励结果
    private Object userTrandsNameObject;

    private boolean isVisibleToUser = false;

    private TextView tvUsParentId, tvLoginTime;

    private CountDownTimer countDownTimer;


    //金币提现按钮
    private TextView moneyGoldCoin_with;
    //红包提现按钮
    private TextView moneyRedPacket_with;


    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        if (ObjectUtil.isNotNull(view)) {
            return view;
        }
        view = inflater.inflate(R.layout.view_page_content_style, container, false);
        super.onCreateView(inflater, container, savedInstanceState);
        if (isVisibleToUser) {
            new Handler(Looper.getMainLooper()).post(() -> {
                initAd();
            });
        }

        tvCode.setText("ID:" + getSharedPreferences("id"));

        new Handler(Looper.getMainLooper()).post(() -> {
            //加载答题次数
            loadDayAdReward();
        });

        String answerCountStr = getSharedPreferences("answerCount");
        if (StrUtil.isNotEmpty(answerCountStr)) {
            answerCount = Integer.parseInt(answerCountStr);
        }

        new Handler(Looper.getMainLooper()).post(() -> {
            //加载题库
            loadQuestionBank();
        });

        new Handler(Looper.getMainLooper()).post(() -> {
            //更新总共有多少道题
            initDailyTaskFrequency();
        });


        new Handler(Looper.getMainLooper()).post(() -> {
            //初始化 全屏广告
            String fullAdId = getSharedPreferences(RedisEnum.AD_INSERT_FULL_SCREEN.getKey());
            taKuInterstitialFullAd = TaKuInterstitialFullAd.getInstance();
            taKuInterstitialFullAd.loadAd(this.getActivity(), fullAdId);
            taKuRewardAdCallback = TaKuRewardAdCallback.getInstance();
        });

//        ImmersionBar.with(this).titleBar(view.findViewById(R.id.layout_top)).init();
        return view;
    }


    @Override
    public void onStart() {
        super.onStart();
        tvNickname.setText(getSharedPreferences("nickname"));
        tvMoneyRedPacket.setText(getSharedPreferences("moneyRedPacket"));
        tvMoneyGoldCoin.setText(getSharedPreferences("moneyGoldCoin"));

//        tvUsParentId.setText("渠道ID：" + usParentId);
        String loginTime = getSharedPreferences("loginTime");
//        tvLoginTime.setText(loginTime);

        tv_time.setText(loginTime);
        String usParentId = getSharedPreferences("usParentId");
        if (usParentId == null || "".equals(usParentId)) {
            tv_parent_id.setVisibility(View.GONE);
        } else {
            tv_parent_id.setVisibility(View.VISIBLE);
            tv_parent_id.setText("推荐人ID:" + usParentId);

        }

    }

    @Override
    public void setUserVisibleHint(boolean isVisibleToUser) {
        this.isVisibleToUser = isVisibleToUser;
        if (ObjectUtil.isNotNull(countDownTimer)) {
            countDownTimer.cancel();
        }
        if (isVisibleToUser) {
            initAd();

        }
        super.setUserVisibleHint(isVisibleToUser);
    }

    private void initDailyTaskFrequency() {

        BaseVo baseVo = new BaseVo();
        baseVo.setInfo(getMyUUID());
        hucRequestInterfase.executeStr(this, ConfigInfo.class, HUCState.HUC_REQEUST_CODE_6, Request.Method.POST, UrlConfig.URL_CONFIG_INFO, hucParameInterfase.getRequestParameter(baseVo), true);

    }

    private String getMyUUID() {
        final String androidId = android.provider.Settings.Secure.getString(getActivity().getContentResolver(), android.provider.Settings.Secure.ANDROID_ID);
        return androidId;
    }


    @Override
    public void initView() {
        super.initView();
        //sf
        tvMoneyGoldCoin = view.findViewById(R.id.tv_moneyGoldCoin);
        tvMoneyRedPacket = view.findViewById(R.id.tv_moneyRedPacket);
        tvNickname = view.findViewById(R.id.tv_nickname);
        tvCode = view.findViewById(R.id.tv_code);

        //答题卡
        tvLevel = view.findViewById(R.id.tv_Level);
        tvValueAontent = view.findViewById(R.id.tv_value_content);
        tvValueA = view.findViewById(R.id.tv_value_c);
        tvValueB = view.findViewById(R.id.tv_value_d);

        tvUsParentId = view.findViewById(R.id.us_parent_id);
        tvLoginTime = view.findViewById(R.id.tv_login_time);

        answerList = new ArrayList<>();
        textViewList = new ArrayList<>(4);
        textViewList.add(tvValueA);
        textViewList.add(tvValueB);

        channel_package = view.findViewById(R.id.channel_package);
        channel_package.setText("渠道ID:" + BuildConfig.CHANNEL_PACKAGE);

        tv_time = view.findViewById(R.id.tv_time);
        tv_parent_id = view.findViewById(R.id.tv_parent_id);


        //金币提现按钮
        moneyGoldCoin_with = view.findViewById(R.id.moneyGoldCoin_with);
        //红包提现按钮
        moneyRedPacket_with = view.findViewById(R.id.moneyRedPacket_with);

        String RISK_WITHDRAWAL_OPEN_APP = getSharedPreferences(RedisEnum.RISK_WITHDRAWAL_OPEN_APP.getKey());

        if (RISK_WITHDRAWAL_OPEN_APP.equals("1")) {
            moneyGoldCoin_with.setVisibility(View.VISIBLE);
            moneyRedPacket_with.setVisibility(View.VISIBLE);
        } else {
            moneyGoldCoin_with.setVisibility(View.GONE);
            moneyRedPacket_with.setVisibility(View.GONE);
        }

    }

    @Override
    public void initClick() {
        super.initClick();
//         view.findViewById(R.id.tv_withdrawal).setOnClickListener(this);
//         view.findViewById(R.id.tv_withdrawal_hong_bao).setOnClickListener(this);

        view.findViewById(R.id.moneyGoldCoin_with).setOnClickListener(this);
        view.findViewById(R.id.moneyRedPacket_with).setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
        super.onClick(v);
        switch (v.getId()) {

            case R.id.moneyGoldCoin_with:
                sendIntent(this.getActivity(), WithdrawalActivity.class, String.valueOf(HUCState.HUC_REQEUST_CODE_1));
                break;
            case R.id.moneyRedPacket_with:
                sendIntent(this.getActivity(), WithdrawalActivity.class, String.valueOf(HUCState.HUC_REQEUST_CODE_2));
                break;

            case R.id.tv_withdrawal:
                sendIntent(this.getActivity(), WithdrawalActivity.class, String.valueOf(HUCState.HUC_REQEUST_CODE_1));
                break;
            case R.id.tv_withdrawal_hong_bao:
                sendIntent(this.getActivity(), WithdrawalActivity.class, String.valueOf(HUCState.HUC_REQEUST_CODE_2));
                break;
            case R.id.tv_value_a:
                setTextView(R.id.tv_value_a);
                break;
            case R.id.tv_value_b:
                setTextView(R.id.tv_value_b);
                break;
            case R.id.tv_value_c:
                setTextView(R.id.tv_value_c);
                break;
            case R.id.tv_value_d:
                setTextView(R.id.tv_value_d);
                break;
            default:
                break;
        }
    }

    @Override
    public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

    }

    @Override
    public void rewardAdSign(String ecpm) {
        alertDialog.dismiss();
        alertDialog = null;
        initAd();
    }

    @Override
    public void rewardAdCallback(String orderId) {
        loadDayAdReward();
        this.orderId = orderId;
        if (AdStatusEnum.AD_STATUS_YES.getValue().equals(getSharedPreferences(RedisEnum.APP_FULL_SCREEN.getKey()))) {
            AlertDialog alertDialog = showDialogLoading();
            String key = getSharedPreferences(RedisEnum.TA_KU.getKey());
            if (RedisEnum.TA_KU.getValue().equals(key)) {
                taKuInterstitialFullAd.setRewardAdFullAdInter(this);
                taKuInterstitialFullAd.setToken(getSharedPreferencesToken("token"));
                taKuInterstitialFullAd.showAd(this.getActivity(), alertDialog);
            }
            //提前加载用户奖励
            BaseVo baseVo = new BaseVo();
            baseVo.setTransId(orderId);
            baseVo.setToken(getSharedPreferencesToken("token"));
//            baseVo.setOaid(DeviceUtils.getInstance().getOaId(this.getActivity()));
            baseVo.setOaid(getSharedPreferences(RedisEnum.OAID.getKey()));
            hucRequestInterfase.executeStr(this, TrandsName.class, HUCState.HUC_REQEUST_CODE_4, Request.Method.POST, UrlConfig.URL_TRANS_IDD, hucParameInterfase.getRequestParameter(baseVo), true);
        } else {
            isTransId();
        }
    }

    //副广加载失败处理
    @Override
    public void onError() {
        isTransId();

    }

    //副广关闭/跳过处理
    @Override
    public void onAdClose() {
        isTransId();
    }

    @Override
    public void onSuccessfulStrType(int inputType, Object response) {
        super.onSuccessfulStrType(inputType, response);
        switch (inputType) {
            case HUCState.HUC_REQEUST_CODE_6:

                ConfigInfo info = (ConfigInfo) response;
                setSharedPreferences(RedisEnum.DAILY_TASK_FREQUENCY.getKey(), info.getDaily_task_frequency());
                //Log.e("DAILY_TASK_FREQUENCY","答题数量--->>> "+info.getDaily_task_frequency());

                break;

            case HUCState.HUC_REQEUST_CODE_8:
                if (response instanceof DayAdReward) {
                    DayAdReward dayAdReward = (DayAdReward) response;
                    setSharedPreferences("day_reward_count", dayAdReward.getDay_reward_count());
                    setSharedPreferences(MoneyTypeEnum.MONEY_COMMISSION_GOLD_COINS.getKey(), dayAdReward.getMoney_commission_gold_coins());
                    setSharedPreferences(MoneyTypeEnum.MONEY_COMMISSION_RED_ENVELOPE.getKey(), dayAdReward.getMoney_commission_red_envelope());
                    setSharedPreferences(MoneyTypeEnum.MONEY_EXTENSION_RED_ENVELOPE.getKey(), dayAdReward.getMoney_extension_red_envelope());
                    setSharedPreferences(MoneyTypeEnum.MONEY_EXTENSION_RED_ENVELOPE.getKey(), dayAdReward.getMoney_extension_red_envelope());
                    indexTextViewList = Integer.parseInt(dayAdReward.getDay_reward_count());
                    setRefreshAnswer(indexTextViewList);
                }

                loadDismiss();
                break;

            case HUCState.HUC_REQEUST_CODE_2:
                if (response instanceof List) {
                    answerList = (List<Answer>) response;
                    //加载题库
                    setRefreshAnswer(indexTextViewList);
                }
                loadDismiss();
                break;
            case HUCState.HUC_REQEUST_CODE_3:
                if (response instanceof TrandsName) {
                    TrandsName trandsName = (TrandsName) response;

                    // Log.e("showAdvertisementReward", trandsName.getValueHongBao() + "===== " + trandsName.getValueJingBi());

                    setSharedPreferences(RedisEnum.RISK_ADVERTISING_COINS.getKey(), trandsName.getRiskAdvertisingCoins());
                    setSharedPreferences(RedisEnum.RISK_ADVERTISING_COINS_THAN_EQUAL.getKey(), trandsName.getRiskAdvertisingCoinsThanEqual());
                    setSharedPreferences(RedisEnum.RISK_ADVERTISING_COINS_THAN_EQUAL_TWO.getKey(), trandsName.getRiskAdvertisingCoinsThanEqualTwo());
                    setSharedPreferences(RedisEnum.RISK_WHITE_LIST.getKey(), trandsName.getRiskWhiteList());
                    showAdvertisementReward(trandsName);
                }
                if (ObjectUtil.isNotNull(loadingDialogTransID)) {
                    if (loadingDialogTransID.isShowing()) {
                        loadingDialogTransID.dismiss();
                    }
                }
                loadingDialogTransID = null;
                if (userTrandsNameObject instanceof List || response instanceof List) {
//                    Toast.makeText(this.getActivity(), "领取奖励失败", Toast.LENGTH_LONG).show();
                    initAd();
                    return;
                }
                break;
            case HUCState.HUC_REQEUST_CODE_4:
                userTrandsNameObject = response;
                break;


            default:
                break;
        }

    }

    @Override
    public void onFailStrType(int inputType, Object response) {
        super.onFailStrType(inputType, response);


    }

    @Override
    public void onErrorLogin(int inputType, Object response) {
        loadDismiss();
        if (UrlAddressConfig.CHANNEL_TYPE == 1) {
            Objects.requireNonNull(getActivity()).finish();
            Intent intent = new Intent(getActivity(), WXEntryActivity.class);
            intent.putExtra("response", response.toString());
            getActivity().startActivity(intent);
        }
    }

    //答题领取奖励页面 yes
    private void dialogAnswerYes(TextView textView) {
        AlertDialog.Builder dialog = new AlertDialog.Builder(this.getActivity());
        View root = LayoutInflater.from(this.getActivity()).inflate(R.layout.pop_advertisemen_yes_style, null);
        dialog.setView(root);
        alertAd(root, 1);
//        TextView tvTime = root.findViewById(R.id.tv_time);
//        View llVisible = root.findViewById(R.id.ll_visible);
        View llGone = root.findViewById(R.id.ll_gone);
        TextView tvUserId = root.findViewById(R.id.tv_user_id);
        TextView tvOk = root.findViewById(R.id.tv_ok);
        TextView tvLoginTime = root.findViewById(R.id.tv_login_time);


        TextView tv_parent = root.findViewById(R.id.tv_parent);
        String usParentId = getSharedPreferences("usParentId");
        if (usParentId == null || "".equals(usParentId)) {
            tv_parent.setVisibility(View.GONE);
        } else {
            tv_parent.setVisibility(View.VISIBLE);
            tv_parent.setText("推荐人ID:" + usParentId);

        }


        TextView tv_cancel = root.findViewById(R.id.tv_cancel);
        // 获取下一关今日点击次数
        String savedValue = getSharedPreferences(RedisEnum.NEXTBUTTOMCLICKNUMS.getKey());
        int clickCount = getTodayClickCount(savedValue);


        String loginTime = getSharedPreferences("loginTime");
        tvLoginTime.setText(loginTime);
        tvUserId.setText("用户ID:" + getSharedPreferences("id"));
        TextView tvChannelId = root.findViewById(R.id.tv_channel_id);

        //  tvChannelId.setText("渠道ID：" + usParentId);
        tvChannelId.setText("渠道ID：" + BuildConfig.CHANNEL_PACKAGE);
        TextView tvNumber = root.findViewById(R.id.tv_number);
        String dayNumber = getSharedPreferences(RedisEnum.DAILY_TASK_FREQUENCY.getKey());
//        String dayRewardCount = getSharedPreferences("day_reward_count");
        int answerNum = indexTextViewList;

        tvNumber.setText("(" + answerNum + "/" + dayNumber + ")");
        String time = getSharedPreferences(RedisEnum.TIME_INTERVAL_ANSWER.getKey());
        ProgressBar progressBar = root.findViewById(R.id.progress_bar);
        try {
            double rewardCountTask = Double.valueOf(answerNum);
            double dayNumberAll = Double.valueOf(dayNumber);
            if (answerNum > 0) {
                int progressValue = (int) (rewardCountTask / dayNumberAll * 100);
                progressBar.setProgress(progressValue);
            } else {
                progressBar.setProgress(0);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        CountDownTimer countDownTimer = new CountDownTimer(Integer.parseInt(time), 1000) { // 设置倒计时的总时间和间隔
            @Override
            public void onTick(long millisUntilFinished) {
//                tvTime.setEnabled(false);
                tv_cancel.setVisibility(View.GONE);
                tvOk.setEnabled(false);
                tvOk.setText("立即领取(" + millisUntilFinished / 1000 + "s)");
            }

            @Override
            public void onFinish() {
                if (clickCount > 0) {
                    tv_cancel.setVisibility(View.VISIBLE);
                }

                tvOk.setEnabled(true);
                tvOk.setText("立即领取");
            }
        };
        if (ObjectUtil.isNotNull(countDownTimer)) {
            countDownTimer.start(); // 启动倒计时
        }

        tvOk.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                checkReward(textView);


            }
        });
        tv_cancel.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                String savedValue = getSharedPreferences(RedisEnum.NEXTBUTTOMCLICKNUMS.getKey());
                int currentCount = getTodayClickCount(savedValue);

                if (currentCount > 0) {
                    // 减少点击次数
                    currentCount--;
                    // 保存新的次数
                    DeviceUtils.getInstance().saveNextClickCount(getActivity(), currentCount);
                }

                alertDialog.dismiss();
                alertDialog = null;
                initAd();
            }
        });
        if (ObjectUtil.isNotNull(alertDialog)) {
            return;
        }
        alertDialog = dialog.create();
        alertDialog.getWindow().setBackgroundDrawableResource(R.color.transparent);
        alertDialog.getWindow().getDecorView().setPadding(0, 0, 0, 0);
        WindowManager.LayoutParams layoutParams = alertDialog.getWindow().getAttributes();
        layoutParams.width = WindowManager.LayoutParams.MATCH_PARENT;
        layoutParams.height = WindowManager.LayoutParams.WRAP_CONTENT;
        alertDialog.getWindow().setAttributes(layoutParams);
        alertDialog.setCancelable(false);
        alertDialog.show();
    }

    private static final String DATE_FORMAT = "yyyy-MM-dd";

    private int getTodayClickCount(String savedValue) {
        if (TextUtils.isEmpty(savedValue)) {
            return 0;
        }

        String[] parts = savedValue.split(":");
        if (parts.length != 2) {
            return 0;
        }

        // 检查是否是今天的数据
        String savedDate = parts[0];
        String today = new SimpleDateFormat(DATE_FORMAT, Locale.getDefault()).format(new Date());

        if (!today.equals(savedDate)) {
            // 如果不是今天的数据，返回0
            return 0;
        }

        try {
            return Integer.parseInt(parts[1]);
        } catch (NumberFormatException e) {
            return 0;
        }
    }


    private void checkReward(TextView textView) {
        BaseVo baseVo = new BaseVo();
//        if (orderId==null){
//            orderId = UUID.randomUUID().toString().replace("-", "");
//        }
//        Log.e("orderId",orderId);
        baseVo.setTransId(orderId);
        baseVo.setToken(getSharedPreferencesToken("token"));
//        baseVo.setOaid(DeviceUtils.getInstance().getOaId(this.getActivity()));
        baseVo.setOaid(getSharedPreferences(RedisEnum.OAID.getKey()));
        loadingDialogTransID = showDialogLoading();
        hucRequestInterfase.executeStr(new HUCCallBackInterfase() {
            @Override
            public void onSuccessfulStrType(int inputType, Object response) {
                switch (inputType) {
                    case 1:
                        Toast.makeText(getActivity(), response.toString(), Toast.LENGTH_LONG).show();
                        //  nextQuestion(textView);
                        alertDialog.dismiss();
                        alertDialog = null;

                        if (ObjectUtil.isNotNull(loadingDialogTransID)) {
                            if (loadingDialogTransID.isShowing()) {
                                loadingDialogTransID.dismiss();
                            }
                        }
                        loadingDialogTransID = null;
                        break;
                    case HUCState.HUC_REQEUST_CODE_5:

                        if (AdStatusEnum.AD_STATUS_YES.getValue().equals(getSharedPreferences(RedisEnum.APP_ANSWER_INCENTIVE.getKey()))) {
                            //用户白名单
                            String risk_white_list = getSharedPreferences(RedisEnum.RISK_WHITE_LIST.getKey());
                            if (RiskEnum.RISK_YES.getValue().equals(risk_white_list)) {
                                AlertDialog alertDialogName = showDialogLoading();
                                String key = getSharedPreferences(RedisEnum.TA_KU.getKey());
                                if (RedisEnum.TA_KU.getValue().equals(key)) {
                                    taKuRewardAdCallback.setUserId(getSharedPreferences("id"));
                                    taKuRewardAdCallback.setToken(getSharedPreferencesToken("token"));
                                    taKuRewardAdCallback.setAnsweringTime(getSharedPreferences(RedisEnum.ANSWERINGTIME.getKey()));
                                    taKuRewardAdCallback.setAnswerType(getSharedPreferences(RedisEnum.ANSWERTYPE.getKey()));

                                    taKuRewardAdCallback.setBaseFragment(ContentFragment.this);
                                    taKuRewardAdCallback.setRewardAdCallbackInter(ContentFragment.this);
                                    taKuRewardAdCallback.setAlertDialog(alertDialogName);
                                    taKuRewardAdCallback.showAd(ContentFragment.this.getActivity());

                                }
                                alertDialog.dismiss();
                                alertDialog = null;
                                loadDayAdReward();
                                return;
                            }
                            Integer dayNumber = Integer.valueOf(getSharedPreferences(RedisEnum.DAILY_TASK_FREQUENCY.getKey(), "0"));
                            //每日激励视频可看N次
                            Integer dayCount = Integer.valueOf(getSharedPreferences("day_reward_count", "0"));
                            if (dayCount >= dayNumber) {
                                Toast.makeText(ContentFragment.this.getActivity(), "今日任务已完成", Toast.LENGTH_LONG).show();

                                alertDialog.dismiss();
                                alertDialog = null;
                                return;
                            }
                            //今日广告总金币允许N金币
                            String risk_advertising_coins = getSharedPreferences(RedisEnum.RISK_ADVERTISING_COINS.getKey());
                            if (RiskEnum.RISK_YES.getValue().equals(risk_advertising_coins)) {
                                Toast.makeText(ContentFragment.this.getActivity(), "今日奖励已上限", Toast.LENGTH_LONG).show();

                                alertDialog.dismiss();
                                alertDialog = null;
                                return;
                            }
                            //今日广告总金币N次平均值小于等于N金币
                            String risk_advertising_coins_than_equal = getSharedPreferences(RedisEnum.RISK_ADVERTISING_COINS_THAN_EQUAL.getKey());
                            if (RiskEnum.RISK_YES.getValue().equals(risk_advertising_coins_than_equal)) {
                                Toast.makeText(ContentFragment.this.getActivity(), "贡献值过低", Toast.LENGTH_LONG).show();

                                alertDialog.dismiss();
                                alertDialog = null;
                                return;
                            }
                            //今日广告总金币N次大于N金币小于等于N金币
                            String risk_advertising_coins_than_equal_two = getSharedPreferences(RedisEnum.RISK_ADVERTISING_COINS_THAN_EQUAL_TWO.getKey());
                            if (RiskEnum.RISK_YES.getValue().equals(risk_advertising_coins_than_equal_two)) {
                                Toast.makeText(ContentFragment.this.getActivity(), "贡献值过低", Toast.LENGTH_LONG).show();

                                alertDialog.dismiss();
                                alertDialog = null;
                                return;
                            }
                            String key = getSharedPreferences(RedisEnum.TA_KU.getKey());
                            if (RedisEnum.TA_KU.getValue().equals(key)) {
                                AlertDialog alertDialog = showDialogLoading();
                                taKuRewardAdCallback.setUserId(getSharedPreferences("id"));
                                taKuRewardAdCallback.setToken(getSharedPreferencesToken("token"));
                                taKuRewardAdCallback.setAnsweringTime(getSharedPreferences(RedisEnum.ANSWERINGTIME.getKey()));
                                taKuRewardAdCallback.setAnswerType(getSharedPreferences(RedisEnum.ANSWERTYPE.getKey()));

                                taKuRewardAdCallback.setBaseFragment(ContentFragment.this);
                                taKuRewardAdCallback.setRewardAdCallbackInter(ContentFragment.this);
                                taKuRewardAdCallback.setAlertDialog(alertDialog);
                                taKuRewardAdCallback.showAd(ContentFragment.this.getActivity());

                            }
                        }

                        alertDialog.dismiss();
                        alertDialog = null;
                        loadDayAdReward();

                        if (ObjectUtil.isNotNull(loadingDialogTransID)) {
                            if (loadingDialogTransID.isShowing()) {
                                loadingDialogTransID.dismiss();
                            }
                        }
                        loadingDialogTransID = null;
                        if (userTrandsNameObject instanceof List || response instanceof List) {
//                            Toast.makeText(getActivity(), "领取奖励失败", Toast.LENGTH_LONG).show();
                            initAd();
                            return;
                        }

                        break;

                }


            }

            @Override
            public void onFailStrType(int inputType, Object response) {
                if (ObjectUtil.isNotNull(loadingDialogTransID)) {
                    if (loadingDialogTransID.isShowing()) {
                        loadingDialogTransID.dismiss();
                    }
                }
                loadingDialogTransID = null;

                // nextQuestion(textView);
                alertDialog.dismiss();
                alertDialog = null;

            }

            @Override
            public void onSuccessfulBitampType(int inputType, Bitmap response) {

            }

            @Override
            public void onErrorResponse(int inputType, VolleyError response) {
                if (ObjectUtil.isNotNull(loadingDialogTransID)) {
                    if (loadingDialogTransID.isShowing()) {
                        loadingDialogTransID.dismiss();
                    }
                }
                loadingDialogTransID = null;
                //  nextQuestion(textView);
                alertDialog.dismiss();
                alertDialog = null;
            }

            @Override
            public void onErrorLogin(int inputType, Object response) {
                loadDismiss();
                if (UrlAddressConfig.CHANNEL_TYPE == 1) {
                    if (ObjectUtil.isNotNull(loadingDialogTransID)) {
                        if (loadingDialogTransID.isShowing()) {
                            loadingDialogTransID.dismiss();
                        }
                    }
                    loadingDialogTransID = null;
                    //   nextQuestion(textView);
                    alertDialog.dismiss();
                    alertDialog = null;

                    Objects.requireNonNull(getActivity()).finish();
                    Intent intent = new Intent(getActivity(), WXEntryActivity.class);
                    intent.putExtra("response", response.toString());
                    getActivity().startActivity(intent);
                }
            }

            @Override
            public void onResetLogin(Object response) {

                if (ObjectUtil.isNotNull(loadingDialogTransID)) {
                    if (loadingDialogTransID.isShowing()) {
                        loadingDialogTransID.dismiss();
                    }
                }
                loadingDialogTransID = null;
                //   nextQuestion(textView);
                alertDialog.dismiss();
                alertDialog = null;

            }
        }, TrandsName.class, HUCState.HUC_REQEUST_CODE_5, Request.Method.POST, UrlConfig.URL_CHECK_REWARD, hucParameInterfase.getRequestParameter(baseVo), true);


    }

    //错误页面 no
    private void dialogAnswerNo(TextView textView) {
        //判断提现账号
        AlertDialog.Builder dialog = new AlertDialog.Builder(this.getActivity());
        View root = LayoutInflater.from(this.getActivity()).inflate(R.layout.pop_advertisemen_no, null);
        dialog.setView(root);
        TextView tvQuestion = root.findViewById(R.id.tv_question);
        tvQuestion.setText(tvValueAontent.getText().toString());
        alertAd(root, 3);
        TextView tvTime = root.findViewById(R.id.tv_time);
        View llVisible = root.findViewById(R.id.ll_visible);
        View llGone = root.findViewById(R.id.ll_gone);
        String time = getSharedPreferences(RedisEnum.TIME_INTERVAL_ANSWER_ERROR.getKey());
        CountDownTimer countDownTimer = new CountDownTimer(Integer.parseInt(time), 1000) { // 设置倒计时的总时间和间隔
            @Override
            public void onTick(long millisUntilFinished) {
                tvTime.setEnabled(false);
                tvTime.setText(millisUntilFinished / 1000 + "s 重来");
            }

            @Override
            public void onFinish() {
                llGone.setVisibility(View.VISIBLE);
                llVisible.setVisibility(View.GONE);
            }
        };
        if (ObjectUtil.isNotNull(countDownTimer)) {
            countDownTimer.start(); // 启动倒计时
        }
        root.findViewById(R.id.tv_ok).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                String taKu = getSharedPreferences(RedisEnum.TA_KU.getKey());
                AlertDialog loadingDoaLog = showDialogLoading();
                if (RedisEnum.TA_KU.getValue().equals(taKu)) {
                    TaKuRewardAdOne taKuRewardAdOne = TaKuRewardAdOne.getInstance();
                    taKuRewardAdOne.setToastContent("看完视频才能再来一次");
                    taKuRewardAdOne.setAlertDialog(loadingDoaLog);
                    taKuRewardAdOne.setContext(ContentFragment.this.getActivity());
                    taKuRewardAdOne.setRewardAdInter(ContentFragment.this);
                    taKuRewardAdOne.setToken(getSharedPreferences("deviceId"));
                    taKuRewardAdOne.showAd(ContentFragment.this.getActivity());
                }
            }
        });
        root.findViewById(R.id.tv_cancel).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //nextQuestion(textView);
                alertDialog.dismiss();
                alertDialog = null;
                initAd();


            }
        });
        if (ObjectUtil.isNotNull(alertDialog)) {
            return;
        }
        alertDialog = dialog.create();
        alertDialog.getWindow().setBackgroundDrawableResource(R.color.transparent);
        alertDialog.getWindow().getDecorView().setPadding(0, 0, 0, 0);
        WindowManager.LayoutParams layoutParams = alertDialog.getWindow().getAttributes();
        layoutParams.width = WindowManager.LayoutParams.MATCH_PARENT;
        layoutParams.height = WindowManager.LayoutParams.WRAP_CONTENT;
        alertDialog.getWindow().setAttributes(layoutParams);
        alertDialog.setCancelable(false);
        alertDialog.show();
    }


    //奖励页面 start
    @SuppressLint("MissingInflatedId")
    private void showAdvertisementReward(TrandsName trandsName) {

        Log.e("showAdvertisementReward", trandsName.getValueHongBao() + "===== " + trandsName.getValueJingBi());

        // Toast.makeText(this.getActivity(),"showAdvertisementReward"+trandsName.getValueHongBao() +" -- "+trandsName.getValueJingBi(),Toast.LENGTH_SHORT).show();

        //判断提现账号
        AlertDialog.Builder dialog = new AlertDialog.Builder(this.getActivity());
        View root = LayoutInflater.from(this.getActivity()).inflate(R.layout.pop_advertisement_reward, null);
        dialog.setView(root);
        TextView tvHongBao = root.findViewById(R.id.tv_hongbao);
        tvHongBao.setText("+" + trandsName.getValueHongBao());
        TextView tvYuanBao = root.findViewById(R.id.tv_yuanbao);
        tvYuanBao.setText("+" + trandsName.getValueJingBi());
        alertAd(root, 2);
        RTextView tvTime = root.findViewById(R.id.tv_time);
        RTextView tv_ok = root.findViewById(R.id.tv_ok);
        String time = getSharedPreferences(RedisEnum.TIME_INTERVAL_ANSWER_RECEIVE.getKey());
        CountDownTimer countDownTimer = new CountDownTimer(Integer.parseInt(time), 1000) { // 设置倒计时的总时间和间隔
            @Override
            public void onTick(long millisUntilFinished) {
                tvTime.setEnabled(false);
                tvTime.setText(millisUntilFinished / 1000 + "s");
            }

            @Override
            public void onFinish() {
                tvTime.setVisibility(View.GONE);
                tv_ok.setVisibility(View.VISIBLE);
            }
        };
        if (ObjectUtil.isNotNull(countDownTimer)) {
            countDownTimer.start(); // 启动倒计时
        }
        tv_ok.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                initAd();
                //修改页面的值
                int sum = Integer.parseInt(tvMoneyRedPacket.getText().toString()) + Integer.parseInt(trandsName.getValueHongBao());
                int sumGoldCoin = Integer.parseInt(tvMoneyGoldCoin.getText().toString()) + Integer.parseInt(trandsName.getValueJingBi());
                tvMoneyRedPacket.setText(String.valueOf(sum));
                tvMoneyGoldCoin.setText(String.valueOf(sumGoldCoin));
                //修改缓存
                setSharedPreferences("moneyRedPacket", String.valueOf(sum));
                setSharedPreferences("moneyGoldCoin", String.valueOf(sumGoldCoin));
                alertDialog.dismiss();
                alertDialog = null;
                if (ObjectUtil.isNotNull(userTrandsNameObject)) {
                    userTrandsNameObject = null;
                }
            }
        });
        if (ObjectUtil.isNotNull(alertDialog)) {
            return;
        }
        alertDialog = dialog.create();
        alertDialog.getWindow().setBackgroundDrawableResource(R.color.transparent);
        alertDialog.getWindow().getDecorView().setPadding(0, 0, 0, 0);
        WindowManager.LayoutParams layoutParams = alertDialog.getWindow().getAttributes();
        layoutParams.width = WindowManager.LayoutParams.MATCH_PARENT;
        layoutParams.height = WindowManager.LayoutParams.WRAP_CONTENT;
        alertDialog.getWindow().setAttributes(layoutParams);
        alertDialog.setCancelable(false);
        alertDialog.show();
    }
    //奖励页面 end

    //加载题库
    private void loadQuestionBank() {
        BaseVo baseVo = new BaseVo();
        baseVo.setToken(getSharedPreferencesToken("token"));
        hucRequestInterfase.executeStr(this, Answer.class, HUCState.HUC_REQEUST_CODE_2, Request.Method.POST, UrlConfig.URL_QUESTION_BANK, hucParameInterfase.getRequestParameter(baseVo), false);
    }

    //获取答题奖励
    private void isTransId() {
        if (userTrandsNameObject instanceof TrandsName) {
            TrandsName userTrandsName = (TrandsName) userTrandsNameObject;
            showAdvertisementReward(userTrandsName);
            return;
        }
        BaseVo baseVo = new BaseVo();
        baseVo.setTransId(orderId);
        baseVo.setToken(getSharedPreferencesToken("token"));
//        baseVo.setOaid(DeviceUtils.getInstance().getOaId(this.getActivity()));
        baseVo.setOaid(getSharedPreferences(RedisEnum.OAID.getKey()));
        loadingDialogTransID = showDialogLoading();
        hucRequestInterfase.executeStr(this, TrandsName.class, HUCState.HUC_REQEUST_CODE_3, Request.Method.POST, UrlConfig.URL_TRANS_IDD, hucParameInterfase.getRequestParameter(baseVo), true);
    }


    //填充答题选项卡样式
    private void setTextView(int p) {
        for (TextView textView : textViewList) {
            if (p == textView.getId()) {
//                textView.setBackgroundResource(R.drawable.radius_home);
//                textView.setTextColor(getResources().getColor(R.color.white_hui));
                isResult(textView);
            } else {
//                textView.setBackgroundResource(R.drawable.radius_blue_1);
//                textView.setTextColor(getResources().getColor(R.color.orange));
            }
        }
    }

    //答题结果验证
    public void isResult(TextView textView) {
        if (!answer.getQbResult().equals(textView.getText())) {
            dialogAnswerNo(textView);
            return;
        }
        answerCount = answerCount + 1;
        setSharedPreferences("answerCount", String.valueOf(answerCount));
        dialogAnswerYes(textView);
    }

    /**
     * 更新答题UI
     *
     * @param indexTextViewList
     */
    private void setRefreshAnswer(int indexTextViewList) {
        answer = answerList.get(indexTextViewList);
        tvLevel.setText(answer.getQbLevel());
        tvValueAontent.setText((indexTextViewList + 1) + "." + answer.getQbContent());
        tvValueA.setText(answer.getQbValueA());
        tvValueB.setText(answer.getQbValueB());
    }

    //下一题
//    private void nextQuestion(TextView textView) {
//        indexTextViewList = ++indexTextViewList;
//        if (indexTextViewList >= answerList.size()) {
//            indexTextViewList = 0;
//            setSharedPreferences("currentSubject", String.valueOf(indexTextViewList));
//        }
//        setRefreshAnswer(indexTextViewList);
//        textView.setBackgroundResource(R.drawable.radius_blue_1);
//        textView.setTextColor(getResources().getColor(R.color.orange));
//        setSharedPreferences("currentSubject", String.valueOf(indexTextViewList));
//
//    }

    private void initAd() {
        if (ObjectUtil.isNull(view)) {
            return;
        }
        String timeInterval = getSharedPreferences(RedisEnum.TIME_INTERVAL.getKey());
        if (countDownTimer == null) {
            countDownTimer = new CountDownTimer(Integer.parseInt(timeInterval), 1000) { // 设置倒计时的总时间和间隔
                @Override
                public void onTick(long millisUntilFinished) {
                    tvValueA.setOnClickListener(null);
                    tvValueB.setOnClickListener(null);
                    tvLevel.setText(millisUntilFinished / 1000 + "s");
                }

                @Override
                public void onFinish() {
                    tvValueA.setOnClickListener(ContentFragment.this);
                    tvValueB.setOnClickListener(ContentFragment.this);
                    tvLevel.setText(answer.getQbLevel());
                }
            };
        }
        if (ObjectUtil.isNotNull(countDownTimer)) {
            countDownTimer.start(); // 启动倒计时
        }

        ATNativeAdView flContent = view.findViewById(R.id.fl_content);
        String key = getSharedPreferences(RedisEnum.TA_KU.getKey());
        if (RedisEnum.TA_KU.getValue().equals(key)) {
            TaKuNativeAdOneDT taKuNativeAdOneDT = TaKuNativeAdOneDT.getInstance();
            taKuNativeAdOneDT.setmATNativeAdView(flContent);
            taKuNativeAdOneDT.setToken(getSharedPreferencesToken("token"));
            taKuNativeAdOneDT.showAd();
//            taKuBannerAdOne = TaKuBannerAdOne.getInstance();
//            taKuBannerAdOne.setToken(getSharedPreferencesToken("token"));
//            taKuBannerAdOne.load(this.getActivity(), getSharedPreferences(RedisEnum.BANNER_HIGH.getKey()), flContent);
//            TaKuNativeAdOneDT taKuNativeAdOneDT = TaKuNativeAdOneDT.getInstance();
//            taKuNativeAdOneDT.loadAd(getActivity(), StringSplit.splitOrNull(getSharedPreferences(RedisEnum.AD_INFORMATION_FLOW.getKey()), StrUtil.COMMA, 0));
            if (UrlAddressConfig.shouldShowAd()) {
                //全平广告
                TaKuInterstitialAdOne taKuInterstitialAdOne = TaKuInterstitialAdOne.getInstance();
                taKuInterstitialAdOne.setToken(getSharedPreferencesToken("token"));
                taKuInterstitialAdOne.showAd(this.getActivity());
            }
        }
    }

    private void alertAd(View view, int index) {
        if (ObjectUtil.isNull(view)) {
            return;
        }
        ATNativeAdView flContent = view.findViewById(R.id.fl_content);
        ATNativeAdView flContentTop = view.findViewById(R.id.fl_content_top);

        String key = getSharedPreferences(RedisEnum.TA_KU.getKey());
        if (RedisEnum.TA_KU.getValue().equals(key)) {
            if (ObjectUtil.isNotNull(taKuBannerAdOneTop)) {
                taKuBannerAdOneTop.onBannerClose(null);
            }
            if (ObjectUtil.isNotNull(taKuBannerAdOne)) {
                taKuBannerAdOne.onBannerClose(null);
            }

            switch (index) {
                case 1:
                    TaKuNativeAdOneDT taKuNativeAdOneDT = TaKuNativeAdOneDT.getInstance();
                    taKuNativeAdOneDT.setmATNativeAdView(flContent);
                    taKuNativeAdOneDT.setToken(getSharedPreferencesToken("token"));
                    taKuNativeAdOneDT.showAd();

                    TaKuInterstitialAdOneDT taKuInterstitialAdOneDT = TaKuInterstitialAdOneDT.getInstance();
                    taKuInterstitialAdOneDT.setToken(getSharedPreferencesToken("token"));
                    taKuInterstitialAdOneDT.showAd(this.getActivity());

                    TaKuBannerAdOneDT taKuBannerAdOneDT = TaKuBannerAdOneDT.getInstance();
                    taKuBannerAdOneDT.setToken(getSharedPreferencesToken("token"));
//                    String adBottom = getSharedPreferences(RedisEnum.BANNER_HIGH.getKey());
//                    taKuBannerAdOneDT.load(this.getActivity(), adBottom, flContentTop);
                    String[] bannerKeys = getSharedPreferences(RedisEnum.BANNER.getKey()).split(",");
                    if (bannerKeys.length > 7) {
                        taKuBannerAdOneDT.load(this.getActivity(), bannerKeys[7], flContentTop);
                    } else {
                        taKuBannerAdOneDT.load(this.getActivity(), getSharedPreferences(RedisEnum.BANNER.getKey()), flContentTop);
                    }

                    break;
                case 2:
                    TaKuNativeAdOneJL taKuNativeAdOneJT = TaKuNativeAdOneJL.getInstance();
                    taKuNativeAdOneJT.setmATNativeAdView(flContent);
                    taKuNativeAdOneJT.setToken(getSharedPreferencesToken("token"));
                    taKuNativeAdOneJT.showAd();
                    TaKuInterstitialAdOneJL taKuInterstitialAdOneJL = TaKuInterstitialAdOneJL.getInstance();
                    taKuInterstitialAdOneJL.setToken(getSharedPreferencesToken("token"));
                    taKuInterstitialAdOneJL.showAd(this.getActivity());

                    TaKuBannerAdOneJL taKuBannerAdOneJL = TaKuBannerAdOneJL.getInstance();
                    taKuBannerAdOneJL.setToken(getSharedPreferencesToken("token"));
                    String[] bannerKeys2 = getSharedPreferences(RedisEnum.BANNER.getKey()).split(",");
                    if (bannerKeys2.length > 8) {
                        taKuBannerAdOneJL.load(this.getActivity(), bannerKeys2[8], flContentTop);
                    } else {
                        taKuBannerAdOneJL.load(this.getActivity(), getSharedPreferences(RedisEnum.BANNER.getKey()), flContentTop);
                    }
                    break;
                case 3:
                    //信息流
                    TaKuNativeAdOneCW taKuNativeAdOneCW = TaKuNativeAdOneCW.getInstance();
                    taKuNativeAdOneCW.setmATNativeAdView(flContent);
                    taKuNativeAdOneCW.setToken(getSharedPreferencesToken("token"));
                    taKuNativeAdOneCW.showAd();

                    TaKuInterstitialAdOneCW taKuInterstitialAdOneCW = TaKuInterstitialAdOneCW.getInstance();
                    taKuInterstitialAdOneCW.setToken(getSharedPreferencesToken("token"));
                    taKuInterstitialAdOneCW.showAd(this.getActivity());

                    TaKuBannerAdOneCW taKuBannerAdOneCW = TaKuBannerAdOneCW.getInstance();
                    taKuBannerAdOneCW.setToken(getSharedPreferencesToken("token"));
                    String[] bannerKeys3 = getSharedPreferences(RedisEnum.BANNER.getKey()).split(",");
                    if (bannerKeys3.length > 9) {
                        taKuBannerAdOneCW.load(this.getActivity(), bannerKeys3[9], flContentTop);
                    } else {
                        taKuBannerAdOneCW.load(this.getActivity(), getSharedPreferences(RedisEnum.BANNER.getKey()), flContentTop);
                    }
                    break;
            }

        } else {
            mediationTablePlaqueAd = MediationTablePlaqueAd.getInstance();
            mediationTablePlaqueAd.showCacheInterstitialFullAd(this.getActivity(), null);
        }
    }

    private void loadDayAdReward() {

        //获取网络数据
//        loading();
        BaseVo baseVo = new BaseVo();
        baseVo.setToken(getSharedPreferencesToken("token"));
        baseVo.setOaid(getSharedPreferences(RedisEnum.OAID.getKey()));
        hucRequestInterfase.executeStr(this, DayAdReward.class, HUCState.HUC_REQEUST_CODE_8, Request.Method.POST, UrlConfig.URL_TO_DAY_STATISTICS, hucParameInterfase.getRequestParameter(baseVo), true);
    }
}
